<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // valueOf：返回对象本身
        var o = {
            toString: function() {
                console.log("我被调用了！toString");
                return "object";
            },
            valueOf: function () {
                console.log("我被调用了！");
                return -1;
            },
        };
        console.log(o + "123");

        // console.log(o = +o);
    </script>
</body>

</html>